#include <iostream>
using namespace std;


int main ()
{
  string a;
  for (int i = 0; i < 3; i++)
	{
	  cin >> a;
	  if (a != "zero" && a != "one" && a != "two" && a != "three" && a != "four" && a != "five" && a != "six" && a != "seven" && a != "eight" && a != "nine")
	  {
	      cout << "wrong input" << endl;
	      exit(0);
	  }
	  else {
	        for (int j = 0; j < 1; j++)
	        
	            if (a == "zero")
		        {
		            cout << "0";
		        }
    
	            if (a == "one")
		        {
		            cout << "1";
		        }
        
	            if (a == "two")
		        {
		            cout << "2";
		        }
    
	            if (a == "three")
		        {
		            cout << "3";
		        }
        
	            if (a == "four")
		        {
		            cout << "4";
		        }
        
	            if (a == "five")
		        {
		            cout << "5";
		        }
        
	            if (a == "six")
		        {
		            cout << "6";
		        }
        
	            if (a == "seven")
		        {
		            cout << "7";
		        }
        
	            if (a == "eight")
		        {
		            cout << "8";
		        }
        
	            if (a == "nine")
		        {
		            cout << "9";
		        }

	        }
	}
  return 0;
}